package com.example.springboot1.Service.impl;

import com.example.springboot1.Service.CityService;
import com.example.springboot1.mapper.CityMapper;
import com.example.springboot1.pojo.City;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CityServiceImpl implements CityService {
    @Autowired
    public CityMapper cityMapper;
    @Override
    public City getCityById(Integer id) {
        return cityMapper.getCityById(id);
    }

    @Override
    public int InsertCity(City city) {
        int i = cityMapper.InsertCity(city);
        return i;
    }

    @Override
    public int updateCity(City city) {
        int i = cityMapper.updateCity(city);
        return i;
    }
    @Override
    public int deleteCity (Integer id) {
        return cityMapper.deleteCity(id);
    }
}
